package models;

import play.db.jpa.Model;

import javax.persistence.*;

/**
 * Дисциплина
 *
 * User: Администратор
 * Date: 11.06.12
 * Time: 16:08
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "professors")
public class Professor extends Model {

    @Id
    @OneToOne(targetEntity = User.class, fetch = FetchType.EAGER)
    public User user;

    @Override
    public Long getId() {
        return user.getId();
    }

}
